﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Storage;

namespace BenevolentSunData
{
    public class AmbientLight
    {

        #region Light Properties
        Color color;
        public Color Color
        {
            get { return color; }
            set { 
                color = value;
                structColor.SetValue(color.ToVector3());
            }
        }
        #endregion


        #region Effect
        Effect effect;

        EffectParameter structInstance;

        EffectParameter structColor;
        #endregion


        #region Initialization
        public AmbientLight(Effect effect)
        {
            this.effect = effect;
            structInstance = effect.Parameters["AmbientLight"];
            structColor = structInstance.StructureMembers["Color"];

            Color = Color.Black;
        }
        #endregion

    }
}
